define([],function(){
	return {
		http:function(url){
			return  new Promise(function(resolve, reject){
				var xhr=new XMLHttpRequest();
				xhr.open('GET',url,false);
				xhr.onreadystatechange=function(){ 
	            	if(xhr.readyState==4){
	                	if(xhr.status==200){
	                		resolve(xhr.responseText);
	                	}
	               }
	            }
		        xhr.send(); 
			});
		 
		},
		toUrl:function(url){
			var result="";
			if(typeof(url)=="object"){
				while(url){
					var temp=url.name;
					var splitData=temp.split(",");
					
					result=temp+result;
					url=url.parentMap;
				}
			}
			return result;
		}
	}
	
});